using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;

namespace SmartBoard.Core.Networking
{
    public delegate void OnDisconnectEvent();

    public delegate void OnSymmetricAuthenticateEvent(ISocketConnection connection, out RSACryptoServiceProvider serverKey);

    public delegate void OnSSLClientAuthenticateEvent(ISocketConnection connection, out string serverName, ref X509Certificate2Collection certs, ref bool checkRevocation);

    public delegate void OnSSLServerAuthenticateEvent(ISocketConnection connection, out X509Certificate2 certificate, out bool clientAuthenticate, ref bool checkRevocation);

    public enum CallbackThreadType { WorkerThread, IOThread }

    public enum HostType { Server, Client }

    public enum EncryptionType { None, Rijndael, SSL }

    public enum CompressionType { None, GZIP }

    public enum DelimiterType { None, MessageTailExcludeOnReceive, MessageTailIncludeOnReceive }

    public enum ProxyType { SOCKS4, SOCKS4a, SOCKS5, HTTP }

    internal enum EventProcessing { None, Proxy, Encrypt, User }

    internal enum SOCKS5AuthMode { NoAuth = 0, UserPass = 2 }

    internal enum SOCKS5Phase { Idle, Greeting, Authenticating, Connecting }
}